-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Composite types #303
Conversation
Tigrov
commented
Jul 26, 2023
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Fixed issues | #290 |
PR Summary
The new file
In
A new file,
Changes in
The
Tests for managing composite type columns are integrated into
A new file
Tests for the new
In the file |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #303 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 187 242 +55
============================================
Files 13 16 +3
Lines 566 696 +130
============================================
+ Hits 566 696 +130 ☔ View full report in Codecov by Sentry. |
This reverts commit 4119262.
…ypes # Conflicts: # tests/ColumnSchemaTest.php
Co-authored-by: Sergei Predvoditelev <[email protected]>
Co-authored-by: Sergei Predvoditelev <[email protected]>
There are 2 options:
Currently the first option is implemented. $command->insert('product', ['price' => ['value' => 10]])->execute();
$command->insert('product', ['price' => [10, 'USD']])->execute();
$command->insert('product', ['price' => ['value' => 10, 'currency_code' => 'USD']])->execute(); |
We could have both behaviors, so as not to break the behavior with |
JSON can have any structure, but don't support default values (at least in MySQL default value can be null only). Also we don't know composite type column schema. Users that want use composite type abstraction globally must use full filled fields in their code. On the other hand user can use directly So I prefer first option that currently imlemented.
This options contradict each other and cannot be implemented simultaneously. |
This is a new feature and it will not prevent migration. But if you change DBMS for example to MySQL you can use |
Co-authored-by: Sergei Predvoditelev <[email protected]>
# Conflicts: # tests/ColumnSchemaTest.php # tests/SchemaTest.php